package com.lgd.redis;

import redis.clients.jedis.Jedis;

/**
 * Created by 299174105 on 2017/8/3.
 */
public class JedisTest {
    public static void main(String[] args) {
        //192.168.56.105
        Jedis jedis = null;
        try {
            jedis = new Jedis("192.168.56.101", 6379);
            jedis.set("jedisE", "jedisEE");
            String jedisT = jedis.get("jedisE");
            System.out.println(jedisT);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (jedis != null)
                jedis.close();
        }
    }
}
